<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>会员中心-一览网</title>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/member.css">
    <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="js/layer/layer.js"></script>
</head>
<body>
<header>
    <div class="m_top">
        <div class="m_top_bar">
            <div class="m_top_login fl">
                <p><b>13814503433</b> <img src="images/right.png">  <a href="member_index.html">会员中心</a> | <a href="">退出</a></p>
            </div>
            <div class="m_top_search fl">
                <form method="get" action="">
                    <div class="m_search_warp">
                        <i class="ico ico-zoom"></i>
                        <input type="text" value="" placeholder="请输入化学品的中文名，英文名或CAS号" class="m_search_txt">
                    </div>
                    <input type="submit" value="搜索" class="m_search_sub">
                </form>
            </div>
            <div class="m_top_nav rg_menu fr">
                <ul>
                    <li><a href="index.html">平台首页</a><span>|</span></li>
                    <li><div class="show_qrcode"> <img src="images/er-icon.png" class="simple">二维码 <span>|</span><div class="tip-qrcode"><img src="images/qrcode.jpg"></div></div></li>
                    <li class="kf"><a href="javascript:;" class="td">客服中心</a><span>|</span>
                        <div class="kf_child hidden">
                            <ul>
                                <li><a href="help.html">帮助中心</a> </li>
                                <li><a href="feedback.html">反馈意见</a> </li>
                                <li><a href="contact.html">联系我们</a> </li>
                            </ul>
                        </div>
                    </li>
                    <li><a href=""  class="td">网站地图</a></li>
                </ul>
            </div>
        </div>
    </div>
</header>

<div class="clearfix"></div>

<div class="contain pt20">
    <div class="m_content">
        <div class="m_menu fl">
            <div class="mt_menu">
                <dl>
                    <dt class="mn1">会员首页</dt>
                    <dd><a href="member_index.html">会员首页</a></dd>
                </dl>
                <dl>
                    <dt class="mn2">采购中心</dt>
                    <dd><a href="member_buy_add.html">新增求购</a></dd>
                    <dd>
                        <a href="member_buy_list.html">求购管理</a>
                        <ol>
                            <li class="on"><a href="member_buy_list.html">已报价</a></li>
                            <li><a href="member_buy_list_not.html">未报价</a></li>
                            <li><a href="member_buy_list_cancel.html">取消求购</a></li>
                            <li><a href="member_buy_list_lost.html">暂时缺货</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_order_list.html">采购订单</a></dd>
                </dl>
                <dl>
                    <dt class="mn3">销售中心</dt>
                    <dd><a href="member_goods_add.html">上传目录</a></dd>
                    <dd><a href="member_goods_list.html">商品管理</a>
                        <ol class="hidden">
                            <li><a href="member_goods_list.html">已上架</a></li>
                            <li><a href="member_goods_list_down.html">已下架</a></li>
                            <li><a href="member_goods_list_check.html">待审核</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_inquiry_list.html">询单管理</a>
                        <ol class="hidden">
                            <li><a href="member_inquiry_list.html">未报价</a></li>
                            <li><a href="member_inquiry_list_had.html">已报价</a></li>
                            <li><a href="member_inquiry_list_abandon.html">已放弃</a></li>
                        </ol>
                    </dd>
                    <dd><a href="member_sell_list.html">销售订单</a></dd>
                </dl>
                <dl>
                    <dt class="mn4">账号管理</dt>
                    <dd><a href="member_account_attentions.html">我的关注</a></dd>
                    <dd><a href="member_account_informations.html">账号信息</a></dd>
                    <dd><a href="member_account_transaction.html">交易资料</a></dd>
                </dl>
            </div>
        </div>
        <div class="m_con fr">
            <div class="b-bar">
                <div class="b-title"><span>已报价</span></div>
                <div class="b-con">
                    <div class="b-block-search">
                        <form action="" method="post">
                            <input type="text" id="search_params_chemical_info" class="form_input wd300 search-input" name="keywords" placeholder="请输入产品信息" value="" autocomplete="off">
                            <select name="s_invoice_type" id="s_invoice_type" class="form_select">
                                <option value="0">开票类型</option>
                                <option value="1">增值税发票(13%)</option>
                                <option value="2">增值税发票(普通)</option>
                                <option value="3">不含税</option>
                            </select>
                            <select name="range" id="search_params_time_range" class="form_select">
                                <option value="0" selected="">全部</option>
                                <option value="3">近三天</option>
                                <option value="7">近一周</option>
                                <option value="30">近一月</option>
                                <option value="90">近三月</option>
                            </select>
                            <input type="submit" class="submit_btn wd100" value="查 询">
                        </form>
                    </div>
                    <div class="flex b-block-status mt30">
                        <div><input type="checkbox" class="select_all">&nbsp;&nbsp;全选 &nbsp;&nbsp;<a href="javascript:void(0);" class="blue" id="batch_create_order">批量生成订单</a> &nbsp;已选择 <span class="choose_num red bold">0</span> 件商品</div>
                        <div>
                            总数：<span class="red bold">5</span>&nbsp;
                        </div>
                    </div>

                    <div class="flex b-block_list mt20">
                        <div class="iq_item">
                            <div class="flex iq_desc">
                                <div class="iq_check"><input type="checkbox" class="select_part" tabid="24038"> 2020-11-16 10:08:02</div>
                                <div class="iq_name"><a href="" target="_blank" class="blue bold">534-16-7</a> (<a href="http://www.buysellchem.com/products/534-16-7.html" target="_blank">碳酸银</a>)</div>
                                <div class="iq_cas blue bold">增值税发票(13%)</div>
                                <div class="iq_cancel"><a href="javascript:void(0);" tabid="24038" class="cancel">取消求购</a> </div>
                            </div>
                            <div class="clearfix"></div>
                            <div class="iq_con">
                                <table cellpadding="0" cellspacing="0" border="0" class="wdp100">
                                    <tbody>
                                        <tr>
                                            <td>
                                                <div class="flex iq_detail">
                                                    <div class="flex iq_item_list">
                                                        <div class="wd200"><input type="checkbox" name="quotation_detail_id[]" class="inquiry_id_class" value="120459" tabindex="120459" tt="24038" data-invoice_type="1">&nbsp;包装：25.00g</div>
                                                        <div class="wd200">纯度：98% <span style="color: #9d9d9d;">(试剂公司)</span> </div>
                                                        <div class="wd150">价格：<b class="blue">￥202.00</b></div>
                                                        <div class="wd100">货期：1天</div>
                                                    </div>
                                                    <div class="flex iq_item_list">
                                                        <div class="wd200"><input type="checkbox" name="quotation_detail_id[]" class="inquiry_id_class" value="120460" tabindex="120460" tt="24038" data-invoice_type="1">&nbsp;包装：100.00g</div>
                                                        <div class="wd200">纯度：98% <span style="color: #9d9d9d;">(试剂公司)</span> </div>
                                                        <div class="wd150">价格：<b class="blue">￥774.00</b></div>
                                                        <div class="wd100">货期：1天</div>
                                                    </div>
                                                    <div class="flex iq_item_list">
                                                        <div class="wd200"><input type="checkbox" name="quotation_detail_id[]" class="inquiry_id_class" value="120475" tabindex="120475" tt="24038" data-invoice_type="1">&nbsp;包装：50.00g</div>
                                                        <div class="wd200">纯度：99% </div>
                                                        <div class="wd150">价格：<b class="blue">￥380.00</b></div>
                                                        <div class="wd100">货期：1天</div>
                                                    </div>
                                                    <div class="ml30">
                                                        <p class="red bold">报价备注：库存不多  价格当天有效</p>
                                                    </div>
                                                    <div class="flex iq_item_list">
                                                        <div class="wd200"><input type="checkbox" name="quotation_detail_id[]" class="inquiry_id_class" value="120476" tabindex="120476" tt="24038" data-invoice_type="1">&nbsp;包装：100.00g</div>
                                                        <div class="wd200">纯度：99% </div>
                                                        <div class="wd150">价格：<b class="blue">￥760.00</b></div>
                                                        <div class="wd100">货期：1天</div>
                                                    </div>
                                                    <div class="ml30">
                                                        <p class="red bold">报价备注：库存不多  价格当天有效</p>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="wd100 a-center">
                                                <a href="javascript:void(0);" class="create_order" data-invoice_type="1" data-inquire="24038">生成订单</a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="iq_item">
                            <div class="flex iq_desc">
                                <div class="iq_check"><input type="checkbox" class="select_part" tabid="25034"> 2020-11-20 15:27:35</div>
                                <div class="iq_name"><a href="" target="_blank" class="blue bold">516-12-1</a> (<a href="" target="_blank">N-碘代丁二酰亚胺</a>)</div>
                                <div class="iq_cas  blue bold">增值税发票(13%)</div>
                                <div class="iq_cancel"><a href="javascript:void(0);" tabid="25034" class="cancel">取消求购</a> </div>
                            </div>
                            <div class="clearfix"></div>
                            <div class="iq_con">
                                <table cellpadding="0" cellspacing="0" border="0" class="wdp100">
                                    <tbody><tr>
                                        <td>
                                            <div class="flex iq_detail">
                                                <div class="flex iq_item_list">
                                                    <div class="wd200"><input type="checkbox" name="quotation_detail_id[]" class="inquiry_id_class" value="126439" tabindex="126439" tt="25034" data-invoice_type="1">&nbsp;包装：100.00g</div>
                                                    <div class="wd200">纯度：97% <span style="color: #9d9d9d;">(试剂公司)</span> </div>
                                                    <div class="wd150">价格：<b class="blue">￥149.00</b></div>
                                                    <div class="wd100">货期：1天</div>
                                                </div>
                                            </div>
                                        </td>
                                        <td class="wd100  a-center">
                                            <a href="javascript:void(0);" class="create_order" data-invoice_type="1" data-inquire="25034">生成订单</a>
                                        </td>
                                    </tr>
                                    </tbody></table>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <div class="paging">
                        <ul class="pagination">
                            <li class="page-item disabled"><span class="page-link">上页</span></li>
                            <li class="page-item active"><span class="page-link">1</span></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=2">2</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=3">3</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=4">4</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=5">5</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=6">6</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=7">7</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=8">8</a></li>
                            <li class="page-item disabled"><span class="page-link">...</span></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=188">188</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=189">189</a></li>
                            <li class="page-item"><a class="page-link" href="http://www.buysellchem.com/categories/1.html?page=2" rel="next">下页</a></li>
                        </ul>
                    </div>

                </div>
            </div>

        </div>
        <form id="create_order_form" action="member_order_create.html" accept-charset="UTF-8" method="post">
            <input type="hidden" name="_token" value="ICF33lDYhJBfTZN5oUh3qY71owzkY7XwIhYt2cwn">                    <input name="utf8" type="hidden" value="✓">
            <input type="hidden" name="invoice_type" id="invoice_type">
            <input type="hidden" name="quotation_detail_ids" id="quotation_detail_ids">
            <input type="hidden" name="inquire_id" id="inquire_id">
        </form>
    </div>
    <div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<footer>
    <div class="footer">
        <div class="foot_con">
            <div class="ft_left">
                <div class="ft_service">
                    <img src="images/service.png">
                    <p class="yellow fz16 bold mt10">电话：025-66028182</p>
                    <p class="fz16 mt10">QQ：2850281398</p>
                    <p class="fz16 mt10">工作时间 8:30 - 17:30</p>
                </div>
            </div>
            <div class="ft_center">
                <dl>
                    <dt>新手上路</dt>
                    <dd><a href="">用户注册</a></dd>
                    <dd><a href="">隐私声明</a></dd>
                    <dd><a href="">使用须知</a></dd>
                    <dd><a href="">协议条款</a></dd>
                </dl>
                <dl>
                    <dt>联系我们</dt>
                    <dd><a href="">关于我们</a></dd>
                    <dd><a href="">联系我们</a></dd>
                    <dd><a href="">合作伙伴</a></dd>
                    <dd><a href="">通知公告</a></dd>
                </dl>
                <dl>
                    <dt>售后服务</dt>
                    <dd><a href="">开票服务</a></dd>
                    <dd><a href="">退换货服务</a></dd>
                    <dd><a href="">用户反馈</a></dd>
                    <dd><a href="">发货方式</a></dd>
                </dl>
                <dl>
                    <dt>帮助中心</dt>
                    <dd><a href="">售后政策</a></dd>
                    <dd><a href="">退换货说明</a></dd>
                    <dd><a href="">退款说明</a></dd>
                    <dd><a href="">产品目录</a></dd>
                </dl>
            </div>
            <div class="ft_right">
                <div class="ft_qrcode">
                    <img src="images/qrcode.jpg">
                    <p>关注公众号</p>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="copyright">
            <p>版权所有 Copyright(C)2020 南京一览生物科技有限公司 <a href="http://www.beian.miit.gov.cn/" style="color: #777272;">苏ICP备20017967号-1</a></p>
        </div>
    </div>
    <div class="clearfix"></div>
</footer>
<div class="hidden" id="template">
    <div class="flex b_inq_item">
        <div class="flex b_inq_item_c">
            <div><input class="form_input" alis="input_cas" name="inquiry[cas][]" placeholder="请输入CAS号码" type="text" value=""></div>
            <div>
                <input class="form_input wd80" alis="input_package1" name="inquiry[package1][]" placeholder="数量1" type="number" value="" min="0" autocomplete="off">
                <select class="form_select" name="inquiry[package1_unit][]" alis="input_package1_unit" tabindex="-1">
                    <option value="">单位</option>
                    <option value="1">mg</option>
                    <option value="2">g</option>
                    <option value="3">kg</option>
                    <option value="4">ml</option>
                    <option value="5">l</option>
                    <option value="6">ton</option>
                </select>
            </div>
            <div>
                <input class="form_input wd90" alis="input_package2" name="inquiry[package2][]" type="number" value="" min="0" placeholder="数量2(选填)" autocomplete="off">
                <select class="form_select" name="inquiry[package2_unit][]" alis="input_package2_unit" tabindex="-1">
                    <option value="">单位</option>
                    <option value="1">mg</option>
                    <option value="2">g</option>
                    <option value="3">kg</option>
                    <option value="4">ml</option>
                    <option value="5">l</option>
                    <option value="6">ton</option>
                </select>
            </div>
            <div><textarea class="form_textarea" name="inquiry[note][]" cols="20" rows="2"></textarea></div>
            <div><a href="javascript:void(0);" class="blue_btn" name="delete">删除</a></div>
        </div>
        <div class="b_inq_name">二碳酸二叔丁酯Di-tert-butyl dicarbonate</div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    // 单列全选
    $(":checkbox[name='quotation_detail_id[]']").click(function(){
        set_num()
    });
    //单个询单全选
    $(".select_part").click(function(){
        var tabid = $(this).attr('tabid');
        if($(this).prop('checked')){
            $(this).prop("checked", true);
            $(":checkbox[tt='"+tabid+"']").prop("checked", true);
        }else{
            $(this).prop("checked", false);
            $(":checkbox[tt='"+tabid+"']").prop("checked", false);
        }
        set_num();
    });
    // 全选
    $(".select_all").click(function(){
        if($(this).prop('checked')){
            $(".select_all").prop("checked", true);
            $('.select_part').prop("checked", true);
            $(":checkbox[name='quotation_detail_id[]']").prop("checked", true);
        }else{
            $(".select_all").prop("checked", false);
            $('.select_part').prop("checked", false);
            $(":checkbox[name='quotation_detail_id[]']").prop("checked", false);
        }
        set_num();
    });

    function set_num(){
        $(".choose_num").html($(":checkbox[name='quotation_detail_id[]']:checked").length);
    }

    //生成订单
    $(".create_order").click(function(){
        var selected_qd = $(this).parents("table").find(":checkbox[name='quotation_detail_id[]']:checked");

        if (selected_qd.length > 0){
            $("#invoice_type").val($(this).data()['invoice_type']);
            $("#inquire_id").val($(this).data()['inquire']);
            var quotation_detail_ids = [];
            selected_qd.each(function(){
                quotation_detail_ids.push($(this).val());
            });
            $("#quotation_detail_ids").val(quotation_detail_ids.join(","));
            $("#create_order_form").submit();
        }else{
            layer.alert('请选择包装！',{
                skin: 'layui-layer-lan',
                anim: 4 //动画类型
            });
        }
    });

    //批量生成订单
    $("#batch_create_order").click(function () {
        var selected_qd = $(":checkbox[name='quotation_detail_id[]']:checked");
        if (selected_qd.length > 0){
            var quotation_detail_ids = [];
            var invoice_types = [];
            var inquiry_ids = [];

            selected_qd.each(function(){
                quotation_detail_ids.push($(this).val());
                inquiry_ids.push($(this).attr("tt"));
                var invoice_type = $(this).parents("table").find(".create_order").data()['invoice_type'];
                if(!invoice_types.includes(invoice_type)){
                    invoice_types.push(invoice_type);
                }
            });

            //发票类型不一致，不允许批量创建订单
            if(invoice_types.length != 1){
                layer.alert('发票类型不一致！',{
                    skin: 'layui-layer-lan',
                    anim: 4 //动画类型
                });
                return;
            }


            $("#invoice_type").val(invoice_types[0]);
            $("#inquire_id").val(inquiry_ids.join(","));
            $("#quotation_detail_ids").val(quotation_detail_ids.join(","));
            $("#create_order_form").submit();

        }else{
            layer.alert('请选择包装！',{
                skin: 'layui-layer-lan',
                anim: 4 //动画类型
            });
        }
    });
</script>